//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.周赛.周赛448;

public class Q1 {
    public Q1() {
    }

    public static void main(String[] args) {
        System.out.println(maxProduct(124));
    }

    public static int maxProduct(int n) {
        char[] chars = String.valueOf(n).toCharArray();
        int count = 0;

        for(int i = 0; i < chars.length; ++i) {
            for(int j = i + 1; j < chars.length; ++j) {
                count = Math.max(count, (chars[i] - 48) * (chars[j] - 48));
            }
        }

        return count;
    }
}
